<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<script>
    var str = "你是天边最美的云彩";
	var str1 = str;
	
	str = "让我用心把你留下来";
	
	console.log(str1);

	var num1 =  110;
	var num2 = num1;
	num1 = 119;
	console.log(num2);
	
	// 值类型的赋值
	// 直接将存储的数据复制一份进行赋值,两份数据在内存中是完全独立的
	
	var p1 = {
		name: "郭富城",
		age: 60
	}
	
	var p2 = p1;
	
	p1.name = "潘明";
	p1.age = 16;
	
	console.log(p2.name,p2.age);
	
</script>

</body>
</html>